<div class="console-sub-title">
    活跃量统计
    <div data-g-loading-tip data-g-is-loading="isLoading" data-g-is-successed="isSuccessed"></div>
</div>

<div class="form-inline search-con" style="margin-top: 10px;margin-left: 10px;margin-right: 10px ;">
    <span style="margin-left: 10px;">统计方式</span>

    <select class="form-control" ng-model="type" ng-change="isShowTime()">
        <option value="0">按日</option>
        <option value="1">按月</option>
        <option value="2">按时间段</option>
    </select>
        <span style="margin-left: 10px;"  ng-hide="isHideDailyLivingTime">时间段</span>
        <div class="input-group dropdown" style="width: 140px;"  ng-hide="isHideDailyLivingTime">
            <a class="dropdown-toggle my-toggle-select" role="button" data-toggle="dropdown" data-target="#" href="">
                <div class="input-group">
                    <input type="text" class="form-control" data-ng-model="dailyLivingTimeBegin"
                           data-date-time-input="YYYY-MM-DD" readonly>
                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                </div>
            </a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                <datetimepicker data-ng-model="dailyLivingTimeBegin"
                                data-datetimepicker-config="{ dropdownSelector: '.my-toggle-select', startView: 'month', minView: 'day'}">
                </datetimepicker>
            </ul>
        </div>
        <span  ng-hide="isHideDailyLivingTime">-</span>
        <div class="input-group dropdown" style="width: 140px;"  ng-hide="isHideDailyLivingTime">
            <a class="dropdown-toggle my-toggle-select" role="button" data-toggle="dropdown" data-target="#" href="">
                <div class="input-group">
                    <input type="text" class="form-control" data-ng-model="dailyLivingTimeEnd"
                           data-date-time-input="YYYY-MM-DD" readonly>
                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                </div>
            </a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                <datetimepicker data-ng-model="dailyLivingTimeEnd"
                                data-datetimepicker-config="{ dropdownSelector: '.my-toggle-select', startView: 'month', minView: 'day'}">
                </datetimepicker>
            </ul>
        </div>
    <button type="button" class="btn btn-default" ng-click="searchParam()">查询</button>
</div>

<div class="form-inline clearfix" style="margin-bottom: 10px;">
    <button type="button" class="btn btn-danger pull-right" style="margin-right: 5px;" ng-click="exportExcel()">
        导出
    </button>
</div>
<div ui-grid="gridBasicOptions" ui-grid-selection ui-grid-pagination ui-grid-exporter class="grid" style="height:400px;"></div>


<div class="modal " id="dailyLiving-detail" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">{{dailyLivingStatisData.date}}的活跃用户和队伍</h4>
            </div>
            <div class="container">
                <div class="row">
                    <div class="col-xs-6 col-sm-3">
                        <table>
                            <tr>
                                <th>用户ID</th>
                            </tr>
                            <tr ng-repeat="uid in dailyLivingStatisData.userIds  track by $index">
                                <td>{{uid}}</td>
                            <tr>
                        </table>
                    </div>
                    <div class="col-xs-6 col-sm-3">
                        <table>
                            <tr>
                                <th>队伍ID</th>
                            </tr>
                            <tr ng-repeat="gid in dailyLivingStatisData.groupIds  track by $index">
                                <td>{{gid}}</td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>